import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

const api = apiCreator();

export default function basicEventAPI(api) {
  return {
    //同一发行人债券信息
    getSelectData: (query) => api.post(`${config.interfaces.type3}bondInfo/sameIssuerBond/`, query),

    //获取债项表格信息
    findTableData2: (query) => api.post(`${config.interfaces.type3}bondInfo/bondRating/`, query),

    //获取主体评级表格信息
    findTableData1: (query) => api.post(`${config.interfaces.type3}bondInfo/comCreditRating/`, query),

    //仅资管使用--获取内部-主体-表格数据
    findInMainData: (query) => api.post(`zgpt/consolidation/bondpool/internalSubjectRating/`, query),

    //仅资管使用--获取内部-债项-表格数据
    findInBondData: (query) => api.post(`zgpt/consolidation/bondpool/internalFacilityRating/`, query),

    //仅资管使用--获取Cams-主体-表格数据
    findCamsMainData: (query) => api.post(`zgpt/consolidation/bondpool/comCorporateRating/`, query),

    //仅资管使用--获取Cams-债项-表格数据
    findCamsBondData: (query) => api.post(`zgpt/consolidation/bondpool/comFacilityRating/`, query),

    //获取到期兑付表格信息
    findTableData3: (query) => api.post(`${config.interfaces.type3}bondInfo/bondInterest/`, query),

    //获取行权表格信息
    findTableData4: (query) => api.post(`${config.interfaces.type3}bondInfo/bondExerciseOption/`, query),

    //获取我的持仓table数据
    getSearchTotal: (query) => api.post(`${config.interfaces.type1}tradeAnaBndHoldInfo/getSearch`, query),

    //资管获取我的持仓table数据
    getSearchTotalZG: (query) => api.post(`${config.interfaces.type1}tradeAnaBndHoldInfo/getSearch`, query),
  };
}
